<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.io.File"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page session="false"%>
<%
    String sn = request.getParameter("sn");
    if (sn != null) {
        File dir = new File("K:/ApolloData/" + sn + "/inbox/");
        if (!dir.exists()) {
            dir.mkdirs();
        }
        if (dir.exists() && dir.isDirectory()) {
            File[] fs = dir.listFiles();
            if (fs != null && fs.length > 0) {
                String fileName;
                String result = "none";
                for (File f : fs) {
                    fileName = f.getName();
                    if (fileName.endsWith(".d") || fileName.endsWith(".r")) {
                        result = "candown";
                        break;
                    }
                }
                out.print(result);
            } else {
                out.print("none");
            }
        } else {
            out.print("none");
        }
    }
%>